﻿using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.IT;
using Coldairarrow.Entity.PB;
using Coldairarrow.Entity.TD;
using Coldairarrow.IBusiness;
using Coldairarrow.Util;
using Coldairarrow.Util.ClassLibrary;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.TD
{
    public partial interface ITD_CheckBusiness
    {
        Task<PageResult<TD_CheckListDTO>> GetDataListAsync(PageInput<CheckConditionDTO> input);
        Task<TD_Check> GetTheDataAsync(string id);
        Task AddDataAsync(TD_Check data);
        Task UpdateDataAsync(TD_Check data);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 获取登录人所属公司的所有仓库
        /// </summary>
        /// <returns></returns>
        Task<List<Base_Department>> GetDeptListAsync();

        /// <summary>
        /// 获取仓库下的货区信息
        /// </summary>
        /// <param name="storId">仓库Id</param>
        /// <returns></returns>
        Task<List<PB_StorArea>> GetStorAreaListAsync(string storId);

        /// <summary>
        /// 获取货区下的货架信息
        /// </summary>
        /// <param name="StorAreaId">货区Id</param>
        /// <returns></returns>
        Task<List<PB_Rack>> GetStorRackListAsync(string StorAreaId);

        /// <summary>
        /// 获取货架下的货位信息
        /// </summary>
        /// <param name="StorRackId">货架Id</param>
        /// <returns></returns>
        Task<List<PB_Location>> GetStorLocaListAsync(string StorRackId);

        /// <summary>
        /// 盘点选择物料信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<TD_CheckLocalMaterialDTO>> GetCheckLocalMaterialAsync(PageInput<MaterialConditionDTO> input);

        /// <summary>
        /// 盘点信息保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task AddCheckAsync(TD_CheckDTO data);

        /// <summary>
        /// 检查当前是否有备货单和收货单未完成
        /// </summary>
        /// <returns></returns>
        Task<AjaxResult> GetCheckMaterialListAsync();

        /// <summary>
        /// 盘点信息删除
        /// </summary>
        /// <param name="ids">盘点id集合</param>
        /// <returns></returns>
        Task DeleteCheckAsync(List<string> ids);

        /// <summary>
        /// 盘点查看详细信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<TD_CheckDataDTO>> GetCheckDataAsync(PageInput<CheckConditionDTO> input);

        /// <summary>
        /// 盘点单确定
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task ToExamineCheckAsync(string checkId);

        /// <summary>
        /// 盘点单审核
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task ToReviewCheckAsync(string checkId);

        /// <summary>
        /// 盘点单开始盘点
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task CheckStartAsync(string checkId);

        /// <summary>
        /// 判断当时公司下是否有盘点单
        /// 盘点单是否在开始作业
        /// 是（true）
        /// 否（false）
        /// </summary>
        /// <param name="MaterialId">物料id</param>
        /// <param name="StorId">仓库id</param>
        /// <param name="LocalId">仓库id</param>
        /// <returns></returns>
        Task<CheckBool> GetTrueOrFalse(string MaterialId, string StorId, string LocalId);

        /// <summary>
        /// 盘点完成
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task UpdateInventoryCompleteAsync(string checkId);

        /// <summary>
        /// 获取盘点明细信息
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task<List<TD_CheckData>> GetCheckDataListAsync(string checkId);

        /// <summary>
        /// 获取实际盘点信息
        /// </summary>
        /// <param name="checkId">盘点单Id</param>
        /// <returns></returns>
        Task<List<TD_CheckPack>> GetCheckPackAsync(string checkId);

        /// <summary>
        /// 获取库存物料信息
        /// </summary>
        /// <param name="data">盘点明细</param>
        /// <returns></returns>
        Task<StorMaterialDTO> GetStorMaterialListAsync(TDcheckDataDTO data);

        /// <summary>
        /// 计算盘差值
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<DiscDifferenceDTO> GetDiscDifferenceAsync(DifferenceDTO data);

        /// <summary>
        /// 盘差
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task UpDifferenceAsync(DifferenceDTO data);

        /// <summary>
        /// 盘差完成(并矫正库存数据)
        /// </summary>
        /// <param name="CheckId">盘点单Id</param>
        /// <returns></returns>
        Task UpCheckDataAsync(string CheckId);

        /// <summary>
        /// PDA盘点
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task InsertCheckDataAsync(CheckData data);

        /// <summary>
        /// PDA盘点获取包信息
        /// </summary>
        /// <param name="PackQrCode">包二维码</param>
        /// <returns></returns>
        Task<CheckPackMaterialDetailDTO> GetCheckPackMaterialDetailDataAsync(string PackQrCode);

        /// <summary>
        /// PDA盘点扫描成品码输入数量
        /// </summary>
        /// <param name="JobQrCode">成品二维码</param>
        /// <param name="LocaQrCode">货位二维码</param>
        /// <returns></returns>
        Task<object> GetCheckJobMaterialDataAsync(string JobQrCode, string LocaQrCode);

        /// <summary>
        /// PDA盘点扫描单个物料
        /// </summary>
        /// <param name="PackQrCode">物料二维码</param>
        /// <param name="LocaQrCode">货位二维码</param>
        /// <returns></returns>
        Task<CheckMaterialDTO> GetCheckMaterialAsync(string PackQrCode,string LocaQrCode);

        /// <summary>
        /// 获取盘点的货位信息
        /// </summary>
        /// <param name="CheckQrCode">盘点单二维码</param>
        /// <param name="LocaQrCode">货位二维码</param>
        /// <returns></returns>
        Task<PB_Location> GetCheckLocationAsync(string CheckQrCode, string LocaQrCode);

        /// <summary>
        /// PDA盘点列表
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<Check> GetCheckDetailListAsync(PageCheckData data);

        /// <summary>
        /// PDA盘点单列表移除
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task DeleteCheckPackDataAsync(CheckDetailDTO data);

        #region  包重置

        /// <summary>
        /// 获取包二维码信息
        /// </summary>
        /// <returns></returns>
        Task<string> GetPackQrCodeAsync();

        /// <summary>
        /// 获取成品对应的物料信息
        /// </summary>
        /// <param name="JobQrcode">成品二维码</param>
        /// <param name="PackStatus">false-扫描成品;true-扫描一个成品输入数量</param>
        /// <param name="PackQrCode">包二维码</param>
        /// <returns></returns>
        Task<PackJobMaterialDTO> GetPackJobMaterialListAsync(string JobQrcode, Boolean? PackStatus,string PackQrCode);

        /// <summary>
        /// 包重置保存(老版)
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SavePackJobDataAsync(PackJobDetailDTO data);

        /// <summary>
        /// 包重置保存(新版)2022-09-06
        /// </summary>
        /// <param name="data"></param>
        /// <param name="_mongodbOptions"></param>
        Task SavePackNumsDataAsync(PackJobDetailDTO data, MongoDBOptions _mongodbOptions);


        #endregion

        #region 调整盘差逻辑2022--8-26(增加盘点库存明细记录)

        /// <summary>
        /// 获取库存信息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<CheckStockDetailDTO> GetCheckStockDetailAsync(TDcheckDataDTO data);

        /// <summary>
        /// 计算盘差值
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<DiscDifferenceDTO> GetDiscDifferenceMaterialAsync(DifferenceDTO data);

        /// <summary>
        /// 盘差
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        void SaveDifference(DifferenceDTO data);

        /// <summary>
        /// 获取盘点单实际盘点信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<ChcekPackMaterialDTO>> GetChcekPackMaterialListAsync(PageInput<CheckConditionDTO> input);

        #endregion

        /// <summary>
        /// pda扫描盘点单扫描货位获取物料详情
        /// </summary>
        /// <param name="panId">盘点单id</param>
        /// <param name="locationId">货位id</param>
        /// <param name="MaterName">物料名称</param>
        /// <returns></returns>
        Task<List<CheckMateralInfo>> GetCheckMateralInfo(string panId, string locationId, string MaterName);

        #region 查询未完成的单据

        /// <summary>
        /// 查询未完成的备货单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_PickUpMain>> GetCheckPickUpMainListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 查询未完成的收货单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<TD_Receiving>> GetCheckReceivingListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 查询未处理的派车单
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_TransportBillDTO>> GetCheckTransportBillListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 查询盘点单是否可以保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<Object> GetCheckTrueOrFalseAsync(TD_CheckDTO data);

        #endregion

    }

    /// <summary>
    /// 部分盘点选择物料搜索
    /// </summary>
    public class MaterialConditionDTO
    {
        /// <summary>
        /// 仓库Id
        /// </summary>
        public string StorId { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocaId { get; set; }

        /// <summary>
        /// 物料类型
        /// </summary>
        public string MaterialTypeId { set; get; }

        /// <summary>
        /// 搜索条件
        /// </summary>
        public string Keyword { set; get; }
    }

    /// <summary>
    /// 盘点查看详细信息搜索
    /// </summary>
    public class CheckConditionDTO
    {
        /// <summary>
        /// 盘点类型
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// 盘点日期
        /// </summary>
        public string CheckTime { get; set; }

        /// <summary>
        /// 搜索条件
        /// </summary>
        public string Keyword { get; set; }

        /// <summary>
        /// 盘点Id
        /// </summary>
        public string checkId { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 盘差状态
        /// </summary>
        public bool? IsComplete { get; set; }

    }

    /// <summary>
    /// 盘点列表model
    /// </summary>
    public class CheckPackDTO : TD_CheckPack
    {

        /// <summary>
        /// 货位名称
        /// </summary>
        public string LocaName { get; set; }

        /// <summary>
        /// 包名称
        /// </summary>
        public string BoxName { get; set; }

        /// <summary>
        /// 物料code
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

    }

    /// <summary>
    /// 盘点扫描包或者物料
    /// </summary>
    public class CheckData
    {

        /// <summary>
        /// 包二维码/物料二维码
        /// </summary>
        public string PackQrCode { get; set; }

        /// <summary>
        /// 货位二维码
        /// </summary>
        public string LocaQrCode { get; set; }

        /// <summary>
        /// 盘点单二维码
        /// </summary>
        public string CheckQrCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? Nums { get; set; }

    }

    /// <summary>
    /// PDA盘点扫描单个物料
    /// </summary>
    public class CheckMaterialDTO
    {
        /// <summary>
        /// 物料编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string Spec { get; set; }


    }

    public class Check
    {
        /// <summary>
        /// 总数量
        /// </summary>
        public int? TotalNums { get; set; }

        public List<CheckDetailDTO> CheckDetail { get; set; }
    }

    /// <summary>
    /// 盘点列表明细
    /// </summary>
    public class CheckDetailDTO
    {
        public int? Rnumber { get; set; }

        /// <summary>
        /// Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 盘点单
        /// </summary>
        public string CheckId { get; set; }

        /// <summary>
        /// 包Id
        /// </summary>
        public string PackId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 包名称
        /// </summary>
        public string BoxName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 货位
        /// </summary>
        public string LocalName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? Nums { get; set; }

        /// <summary>
        /// 操作人Id
        /// </summary>
        public string CreatorId { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 成品Id
        /// </summary>
        public string JobId { get; set; }

    }

    public class PageCheckData
    {
        /// <summary>
        /// 盘点单二维码
        /// </summary>
        public string CheckQrCode { get; set; }

        /// <summary>
        /// 当前页数
        /// </summary>
        public int pageIndex { get; set; }

        /// <summary>
        /// 每页条数
        /// </summary>
        public int pageRows { get; set; }
    }

    /// <summary>
    /// 获取盘点单明细信息
    /// </summary>
    public class TDcheckDataDTO
    {
        /// <summary>
        /// 盘点单明细信息
        /// </summary>
        public List<TD_CheckData> CheckData { get; set; }

        /// <summary>
        /// 实际盘点明细
        /// </summary>
        public List<TD_CheckPack> CheckPack { get; set; }

    }

    /// <summary>
    /// 盘点获取物料库存信息
    /// </summary>
    public class StorMaterialDTO
    {

        /// <summary>
        /// 库存明细
        /// </summary>
        public List<IT_LocalDetail> LocalDetailList { get; set; }

        /// <summary>
        /// 库存汇总
        /// </summary>
        public List<IT_LocalMaterial> LocalMaterialList { get; set; }

        /// <summary>
        /// 物料信息
        /// </summary>
        public List<PB_Material> MaterialList { get; set; }

        /// <summary>
        /// pb_stock
        /// </summary>
        public List<PB_Stock> StockList { get; set; }

    }

    /// <summary>
    /// 盘差传值
    /// </summary>
    public class DifferenceDTO
    {
        /// <summary>
        /// 盘点单Id
        /// </summary>
        public string checkId { get; set; }

        /// <summary>
        /// 盘点明细
        /// </summary>
        public List<TD_CheckData> CheckData { get; set; }

        /// <summary>
        /// 实际盘点明细
        /// </summary>
        public List<TD_CheckPack> CheckPack { get; set; }

        /// <summary>
        /// 库存明细
        /// </summary>
        public List<IT_LocalDetail> LocalDetailList { get; set; }

        /// <summary>
        /// 库存汇总
        /// </summary>
        public List<IT_LocalMaterial> LocalMaterialList { get; set; }

        /// <summary>
        /// 物料信息
        /// </summary>
        public List<PB_Material> MaterialList { get; set; }

        /// <summary>
        /// pb_stock
        /// </summary>
        public List<PB_Stock> StockList { get; set; }

        /// <summary>
        /// PB_StockLog
        /// </summary>
        public List<PB_StockLog> StockLog { get; set; }

        /// <summary>
        /// IT_LocalDetail
        /// </summary>
        public List<IT_LocalDetail> itdata { get; set; }

        /// <summary>
        /// 入库明细
        /// </summary>
        public List<TD_InStorDetail> InStorDetail { get; set; }

        /// <summary>
        /// 出库明细
        /// </summary>
        public List<TD_OutStorDetail> OutStorDetail { get; set; }

        /// <summary>
        /// 盘点单库存明细记录
        /// </summary>
        public List<TD_CheckStockDetail> CheckStockDetail { get; set; }

        /// <summary>
        /// 备货单占用量
        /// </summary>
        public List<PickMaterialOccupyDTO> PickMaterialOccupy { get; set; }

        /// <summary>
        /// sql
        /// </summary>
        public String SqlMain { get; set; }
    }

    /// <summary>
    /// 计算盘差值
    /// </summary>
    public class DiscDifferenceDTO
    {
        /// <summary>
        /// PB_Stock
        /// </summary>
        public List<PB_Stock> StockList { get; set; }

        /// <summary>
        /// PB_StockLog
        /// </summary>
        public List<PB_StockLog> StockLog { get; set; }

        /// <summary>
        /// IT_LocalDetail
        /// </summary>
        public List<IT_LocalDetail> itdata { get; set; }

        /// <summary>
        /// 入库明细
        /// </summary>
        public List<TD_InStorDetail> InStorDetail { get; set; }

        /// <summary>
        /// 出库明细
        /// </summary>
        public List<TD_OutStorDetail> OutStorDetail { get; set; }

        /// <summary>
        /// 盘点单库存明细记录
        /// </summary>
        public List<TD_CheckStockDetail> CheckStockDetail { get; set; }

        /// <summary>
        /// 备货单占用量
        /// </summary>
        public List<PickMaterialOccupyDTO> PickMaterialOccupy { get; set; }

        /// <summary>
        /// sql
        /// </summary>
        public String SqlMain { get; set; }

    }

    /// <summary>
    /// 汇总盘点与库存
    /// </summary>
    public class MaterialLocaDTO
    {
        /// <summary>
        /// 库存明细Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }

        /// <summary>
        /// 库存物料明细数量
        /// </summary>
        public double? Num { get; set; }

        /// <summary>
        /// 是否新旧：0-旧；1-新
        /// </summary>
        public int? OldOrNew { get; set; }

    }

    #region  包重置

    /// <summary>
    /// 获取包内物料明细信息
    /// </summary>
    public class PackJobMaterialDTO
    {
        /// <summary>
        /// 成品Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 包Id
        /// </summary>
        public string PackId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public Double? Nums { get; set; }

    }

    /// <summary>
    /// 包重置传参
    /// </summary>
    public class PackJobDetailDTO
    {
        /// <summary>
        /// 包二维码
        /// </summary>
        public string PackQrCode { get; set; }

        /// <summary>
        /// 货位二维码
        /// </summary>
        public string LocaQrCode { get; set; }

        /// <summary>
        /// false-扫描成品;true-扫描一个成品输入数量
        /// </summary>
        public Boolean? PackStatus { get; set; }

        /// <summary>
        /// 成品物料信息
        /// </summary>
        public List<PackJobMaterialDTO> PackJobMaterial { get; set; }

        /// <summary>
        /// 打印机Id
        /// </summary>
        public string PrintId { get; set; }

    }

    #endregion

    #region SKU扫描降维

    /// <summary>
    /// 出库包的信息
    /// </summary>
    public class CheckPackMaterialDetailDTO
    {
        /// <summary>
        /// 包Id
        /// </summary>
        public string PackId { get; set; }

        /// <summary>
        /// 包二维码
        /// </summary>
        public string PackQrCode { get; set; }

        /// <summary>
        /// 包名称
        /// </summary>
        public string BoxName { get; set; }

        /// <summary>
        /// 包装数量
        /// </summary>
        public double? Nums { get; set; }

        /// <summary>
        /// 包明细
        /// </summary>
        public List<CheckPackMaterialDataDTO> CheckPackMaterial { get; set; }

    }

    /// <summary>
    /// 包明细(物料数量)
    /// </summary>
    public class CheckPackMaterialDataDTO
    {
        /// <summary>
        /// 包Id
        /// </summary>
        public string PackId { get; set; }
        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 成品编码
        /// </summary>
        public string ProductCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? Nums { get; set; }

    }

    /// <summary>
    /// 出库单个成品输入数量
    /// </summary>
    public class CheckJobMaterialDTO
    {
        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 包Id
        /// </summary>
        public string PackId { get; set; }

        /// <summary>
        /// 包二维码
        /// </summary>
        public string PackQrCode { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? Nums { get; set; }

    }

    #endregion

    #region 调整盘差逻辑2022--8-26(增加盘点库存明细记录)

    /// <summary>
    /// 获取仓库信息
    /// </summary>
    public class CheckStockDetailDTO
    {
        /// <summary>
        /// 仓库明细
        /// </summary>
        public List<IT_LocalDetail> LocalDetailList { get; set; }

        /// <summary>
        /// 仓库库存
        /// </summary>
        public List<IT_LocalMaterial> LocalMaterialList { get; set; }

        /// <summary>
        /// 仓库库存
        /// </summary>
        public List<PB_Material> MaterialList { get; set; }
    }

    /// <summary>
    /// 获取盘点货位物料的占用量
    /// </summary>
    public class PickMaterialOccupyDTO
    {
        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }

        /// <summary>
        /// 占用量
        /// </summary>
        public double? Nums { get; set; }

    }

    /// <summary>
    /// 获取盘点单实际盘点信息
    /// </summary>
    public class ChcekPackMaterialDTO
    {
        public int? row_num { get; set; }

        /// <summary>
        /// 盘点单Id
        /// </summary>
        public string CheckId { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterialCode { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 物料规格
        /// </summary>
        public string MaterialSpec { get; set; }

        /// <summary>
        /// 仓库Id
        /// </summary>
        public string StorId { get; set; }

        /// <summary>
        /// 仓库名称
        /// </summary>
        public string StorName { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string localId { get; set; }

        /// <summary>
        /// 货位名称
        /// </summary>
        public string StorAreaName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public double? Nums { get; set; }

    }

    #endregion


    #region 检查盘点单是否可以建立
    public class CheckBillData
    {
        /// <summary>
        /// 状态码
        /// </summary>
        public int? ErrorCode { get; set; }

        /// <summary>
        /// bool
        /// </summary>
        public Boolean? Success { get; set; }

        /// <summary>
        /// 备货单
        /// </summary>
        public List<CheckPickUpMainDTO> PickUpMain { get; set; }

        /// <summary>
        /// 收货单
        /// </summary>
        public List<CheckReceivingDTO> Receiving { get; set; }

        /// <summary>
        /// 装车单
        /// </summary>
        public List<CheckTranBillDTO> TranBill { get; set; }
    }

    /// <summary>
    /// 未完成的备货单
    /// </summary>
    public class CheckPickUpMainDTO
    {
        /// <summary>
        /// 收货单Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 收货日期
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string BuildingId { get; set; }

        /// <summary>
        /// 备货类型
        /// </summary>
        public int? OrderType { get; set; }

        /// <summary>
        /// 发货类型
        /// </summary>
        public string StyleName { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int? Status { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 货位Id
        /// </summary>
        public string LocalId { get; set; }
    }

    /// <summary>
    /// 未完成的收货单
    /// </summary>
    public class CheckReceivingDTO
    {
        /// <summary>
        /// 收货单Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 收货日期
        /// </summary>
        public DateTime RecTime { get; set; }

        /// <summary>
        /// 收货数量
        /// </summary>
        public Double TotalNum { get; set; }

        /// <summary>
        /// 入库数量
        /// </summary>
        public Double InNum { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public Int32 Status { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }
    }

    /// <summary>
    /// 发货装车异常数据
    /// </summary>
    public class CheckTranBillDTO
    {
        /// <summary>
        /// 派车单Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 派车日期
        /// </summary>
        public DateTime? SendTime { get; set; }

        /// <summary>
        /// 车牌号
        /// </summary>
        public string PlateNO { get; set; }

        /// <summary>
        /// 派车类型
        /// </summary>
        public string TransportType { get; set; }

        /// <summary>
        /// 是否是备货单已备物料： 0-否；1-是
        /// </summary>
        public Boolean? TrueOrFalse { get; set; }

        /// <summary>
        /// 是否处理异常：0-否；1-是
        /// </summary>
        public Boolean? IsHandle { get; set; }

        /// <summary>
        /// 物料Id
        /// </summary>
        public string MaterialId { get; set; }
    }


    #endregion
}